import request from '@/utils/request'
import { type Response } from './common.type'

type LoginType = {
	username: string
	password: string
}

// 登录
export function login(data: LoginType): Promise<Response> {
  return request({
    url: '/auth/login',
    method: 'POST',
    data
  })
}